package com.shuqi.common;

public class XOREncryptUncrypt {

    public static byte[] encryptAndUncrypt(byte[] bytes, char secret) { // 对value加密，secret密文字符
        for (int i = 0; i < bytes.length; i++) {
            bytes[i] = (byte) (bytes[i] ^ (int) secret); // 通过异或运算进行加密
        }
        return bytes; // 返回加密后的字符串
    }
}
